package com.rao.travel.dao;

import com.rao.travel.pojo.SysLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Srao
 * @version 1.0
 * @className SysLogDao
 * @date 2019/11/5 22:18
 * @package com.rao.travel.dao
 * @description
 */
@Mapper
public interface SysLogDao {

    /*保存日志*/
    @Insert("insert into sysLog(visitTime, username, ip, url, executionTime, method) values (#{visitTime}, #{username}, #{ip}, #{url}, #{executionTime}, #{method})")
    void save(SysLog sysLog);

    /*查询所有日志信息*/
    @Select("select * from sysLog")
    List<SysLog> findAll();
}
